'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('AppList', {
      id: {
        type: Sequelize.INTEGER,
        autoIncrement: true,
        primaryKey: true
      },
      appName: { // app名字 必填 唯一
        allowNull: false,
        type: Sequelize.STRING(20),
        unique: true
      },
      appUrl: { // app网址 必填 唯一
        allowNull: false,
        type: Sequelize.STRING(50),
        unique: true
      },
      appIcon: {
        type: Sequelize.STRING(50)
      },
      appPlatform: { // app平台 必填 
        allowNull: false,
        type: Sequelize.STRING(20)
      },
      appType: { // app类型 必填
        allowNull: false,
        type: Sequelize.INTEGER,
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('AppDataCollections');
  }
};